import request from '@/utils/request'

// 获取月卡列表
export function getCardList(params) {
  return request({
    url: 'parking/card/list',
    method: 'get',
    params
  })
}

// 添加月卡
export function addCard(data) {
  return request({
    url: 'parking/card',
    method: 'post',
    data
  })
}

// 获取编辑月卡详情
export function getCardDetailAPI(id) {
  return request({
    url: `/parking/card/detail/${id}`
  })
}

// 编辑月卡
export function editCardAPI(data) {
  return request({
    url: '/parking/card/edit',
    method: 'put',
    data
  })
}

// 删除月卡
export function deleteCardAPI(id) {
  return request({
    url: `/parking/card/${id}`,
    method: 'delete'
  })
}

// 批量删除月卡
export function deleteCardBatchAPI(data) {
  return request({
    url: `/parking/card/batch/${data}`,
    method: 'delete'
  })
}
